{* DJ *}
<div class="containertable member_body" >
    
    {if $please_confirm}
		<p><b class='red'>{$smarty.const.LA_WARNING}</b><br />{$smarty.const.LA_DO_YOU_REAL}
		<br/><br /><a href="my_items.php?deleteid={$please_confirm}&confirmed=1"><b><u>{$smarty.const.LA_I_DO}</u></b></a>
		</p>
	{elseif $ad_deleted}
		<p><b>{$smarty.const.LA_DELETED}</b></p>
	{/if}
	
	
    <p><b>{$message}</b></p>

    
    {if $pay_out_of_credits}
	<h4>{$smarty.const.LA_OUT_OF_CREDITS}</h4>
	{$smarty.const.LA_CREDITS_WARNING} <br />
	{$smarty.const.LA_CREDITS_WARNING2}
	<br /><br />{$smarty.const.LA_VISIT_OUR} <a href="payment_options.php"><u>{$smarty.const.LA_PAID_MEMBERSHIP}</u></a> {$smarty.const.LA_FOR_MORE_INFO}<br /><br />
	{/if}
    
    
{if $ads}

<table cellspacing="0" class="box" style="clear:both;">
<tr>
	<th>{$AD_URL} {$smarty.const.TITLE} </a></a></th>
	<th>{$smarty.const.EF_TIPO}</th>
	<th><center>{$smarty.const.LA_ACTION}</center></th>
</tr>	
{assign var=noPagos value=0 }
{foreach item=ad from=$ads}
	<form method="POST" action="my_items.php">
		<input type="hidden" name="renew_id" value="{$ad.ID}" />
		{if $ad.NB is even by 1}
		<tr class="alt">
		{else}
			<tr>
		{/if}
		{*if $ad.ad_enabled==1 *}
			<td class="pointer"><a href="{$ad.LINK}&fromMyItems=1"
			{if $ad.ad_enabled!=1 }
			title="{$smarty.const.HINT_NO_PAY_AD}"
			{/if}
			>
			{if $ad.SPECIAL}<b>{/if}{$ad.TITLE|truncate:41:"...":true}{if $ad.SPECIAL}</b>{/if}</a>
			{if $ad.ad_enabled!=1 }
			<img alt="Alert" src="layout_images/new/alert.gif">
			{/if}			
			</td>
			<td>{$ad.TIPO}<br/>
			<small>{$ad.pname}</small>
			</td>
			<td align="right">
			{$ad.MODAD_URL}<img src="layout_images/new/edit.gif" alt="{$smarty.const.LA_AD_EDIT}" hspace="5" /></a>  
			{$ad.MODIMG_URL}<img src="layout_images/new/images.gif" alt="{$smarty.const.LA_PIC_UPLOAD}" hspace="5" /></a>	
			{****************************}	
			<a href="member_extra.php?ad_id={$ad.ID}" class="thumb_icon" title="{$smarty.const.LA_MEMBER_EXTRA}">
			<img src="layout_images/new/bold2.gif" alt="{$smarty.const.LA_MEMBER_EXTRA}" hspace="5" /></a>		
			{****************************}  
			{if $set_video_upload}
			<a href="upload_video.php?video_ad_id={$ad.ID}" class="thumb_icon" title="{$smarty.const.LA_UPLOAD_VIDEO}">
			<img src="layout_images/new/film.gif" alt="{$smarty.const.LA_UPLOAD_VIDEO}" hspace="5" /></a>  
			{/if}
			{if $set_doc_upload}
			<a href="upload_other.php?doc_ad_id={$ad.ID}" class="thumb_icon" title="{$smarty.const.LA_UPLOAD_DOC}">
			<img src="layout_images/new/doc.gif" alt="{$smarty.const.LA_UPLOAD_DOC}" hspace="5" /></a>  
			{/if}
			{if $ad.AD_SOLD==1}
			 <a href='my_items.php?unsoldid={$ad.ID}' class="thumb_icon" title="{$smarty.const.LA_UNSOLD}">
			 <img src="layout_images/new/not_sold.gif" alt="{$smarty.const.LA_UNSOLD}" hspace="5" /></a>
			{else}
			 <a href='my_items.php?soldid={$ad.ID}' class="thumb_icon" title="{$smarty.const.LA_SOLD}">
			  <img src="layout_images/new/sold.gif" alt="{$smarty.const.LA_SOLD}" hspace="5" /></a>
			{/if}
			<a href='my_items.php?deleteid={$ad.ID}' class="thumb_icon" title="{$smarty.const.LA_DEL}">
			<img src="layout_images/new/ad_delete.gif" alt="{$smarty.const.LA_DEL}" hspace="5" /></a>	
			{if $ad.AD_OWNER_NOTIFIED==1 && $set_renew_ad==1}
			&nbsp;
			<select name="renew_days" class="small_drop_down">
			<option value="30">30 {$smarty.const.DAYS}</option>
			<option value="60">60 {$smarty.const.DAYS}</option>
			<option value="90">90 {$smarty.const.DAYS}</option>
			</select>
			
			<input class="small_drop_down" type="submit" name="renew_submit" value="{$smarty.const.LA_RENEW_AD}" />
			{/if}
			
			</td>	
		{*else}
			{assign var=noPagos value=1 }
			<td class="pagoVerif">{$ad.TITLE|truncate:35:"...":true}</td>
			<td class="pagoVerif">{$ad.TIPO}&nbsp;&nbsp;<b>{$smarty.const.EF_PAGO_X_VERIF}</b><br/><small>{$ad.pname}</small></td>
			<td class="pagoVerif" align="right">
				<div style="float:left;">
				<form method="POST" action="my_items.php">
					<input type="hidden" name="checkCredit" value="1" />
					<input type="hidden" name="ad_id" value="{$ad.ID}" />
					<input type="hidden" name="category" value="{$ad.ad_cat_id}" />
					<input class="verificarCreditoButton" type="submit" name="submitChCr" value="{$smarty.const.EF_COMPROBAR_CREDITO}" />
				</form>&nbsp;
				</div>
				<div style="float:right;">
				<a  href='my_items.php?deleteid={$ad.ID}' class="thumb_icon" title="{$smarty.const.LA_DEL}">
				<img src="layout_images/new/ad_delete.gif" alt="{$smarty.const.LA_DEL}" hspace="5" /></a>
				</div>				
			</td>
		
		{/if*}
		</tr>
	</form>
{/foreach}


<tr>
<td colspan="7" align="center">
{if $prev_url} 
	<a href="{$prev_url}" class="button nextPrev">&lt; {$smarty.const.PREVIOUS_ADS} {$NUM_PER_PAGE}</a> 
{else}
	
{/if}


{if $next_url}	
	<a href="{$next_url}" class="button nextPrev">{$smarty.const.NEXT_ADS} {$NUM_PER_PAGE} &gt;</a> 
{else}	

{/if}
</td>
</tr>
{if $sorryNoCredits}
<tr>
	<td colspan="7" align="right">		
			<b>{$sorryNoCredits}</b>		
	</td>
</tr>
{/if}
</table>

{else}
	{$smarty.const.LA_NOT_YET_ADS_MY}
{/if}

</div>